<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
	</body>
</html>
<script>
	// 随机10个学生的成绩（1-100），打印出最高分，最低分、最高分下标、最低分下标 学生 输出到控制台;
	// 不能用 sort 排序
	
	let score = new Array();
	console.log(score);
	let max = 0;
	let min = 0;
	let maxscore = 0;
	let minscore = 0;
		
	for(let i = 0; i<10; i++){
		score[i] = parseInt(Math.random() * 100 + 1);
	}
	
	for(let i = 0; i<score.length -1; i++ ){
		
		for(let j =0; j<score.length -1 - i; j++){
			if(score[j] > score[j+1]){
				let temp = score[j+1];
				score[j+1] = score[j];
				score[j] = temp;
			}
		}
		
	}
	
	console.log(score[score.length-1]);
	console.log(score[0]);
	console.log(score.length-1);
	console.log(0);
	
	
</script>